var lyricsBag = {
    Text   : '',
    lyrics : [],
    timeArray   : [],
    lyricsArray : [],
    autor       : '',
    name        : '',
    lyricsLoader : function(text){
        // timeArray = text.spilt('\n');
        this.timeArray = [];
        this.lyricsArray = [];
        var array = text.split('[');
        
        for(var i in array){
            var item = array[i].split(']')[0];
            if(/^[0-9]{1,2}:[0-9]{1,2}/.test(item)){
                var min = parseInt(item.split(':')[0]);
                var sec = parseInt(item.split(':')[1]);
                item = min*60 + sec;
                this.timeArray.push(item);
                var lyrics =  array[i].split(']')[1];
                if(lyrics === '' || lyrics === undefined){
                    this.lyricsArray.push({text : ' '});
                }else{
                    this.lyricsArray.push({text : lyrics});
                }
            }else if(/^ti:/.test(item)){
                this.name=item.split(':')[1];
            }else if(/^ar:/.test(item)){
                this.autor=item.split(':')[1];
            }else if(/^al:/.test(item)){
                
            }
        }
    },
    getMusicTimeArray : function(){
        return this.timeArray;
    },
    getMusicLyrics  : function(){
        return this.lyricsArray;
    },
    getMusicAutor : function(){
        return this.autor;
    },
    getMusicName : function(){
        return this.name;
    }
}
